
class Base3{
    private int a;
    private int b;
    public Base3(int a,int b){
        this.a=a;
        this.b=b;
        System.out.println("父类构造方法！");
    }
}
class Derived3 extends Base3{
    public Derived3(){
        super(10,30);
        // super();// 注意子类构造方法中默认会调用基类的无参构造方法：super(),
        // 用户没有写时,编译器会自动添加，而且super()必须是子类构造方法中第一条语句，
        // 并且只能出现一次
        System.out.println("子类构造方法！");
    }
}
public class Test_3 {
    public static void main(String[] args) {
        Derived3 derived3=new Derived3();
    }
}
